# script used to map fields in the demo search form.

# Note: This is a very primitive schema system which will suffice for the demo search forms at this stage.
# Once we he have determined the full functionality required for this, we should re-implement as a proper
# schema system and implement as a core feature of KE.

# widgets are MultiSelect, DropDown, or TextBox
# set join=True on multiselectable items ( Will link to KE latestAnswers table rather than searchIndex table )
# search types for text and numeric boxes are like and equals (searchType='like')

return [ dict(idx='KE4Search_choice',             label='KE4Search_choice'), 
         dict(idx='KE4Search_list',               label='KE4Search_list Users', searchType='equals'),
         dict(idx='KE4Search_list_basic',         label='KE4Search_list_basic'),
         dict(idx='KE4Search_mcq',                label='KE4Search_mcq'),
         dict(idx='KE4Search_numericbox',         label='KE4Search_numericbox', widget='TextBox'),
         dict(idx='KE4Search_textboxSL',          label='KE4Search_textboxSL', widget='TextBox', searchType='equals'),
         dict(idx='KE4Search_textboxML',          label='KE4Search_textboxML', widget='TextBox', searchType='like'),
         dict(idx='KE4Search_selectionRadio',     label='KE4Search_selectionRadio'),
         dict(idx='KE4Search_selectionDrdwn',     label='KE4Search_selectionDrdwn'),
         dict(idx='KE4Search_selectionCkBox',     label='KE4Search_selectionCkBox', widget='MultiSelect', join=True),
         dict(idx='KE4Search_selectionMultiSel',  label='KE4Search_selectionMultiSel', widget='MultiSelect', join=True),
         dict(idx='KE4Search_date',               label="KE4Search_Date Range Test",  widget='Range'),
         dict(idx='KE4Search_numrange',           label="KE4Search_Num Range Test",   widget='Range', valueType="Integer"),
]
